package com.hg.library.utils;

import com.orhanobut.logger.Logger;
import com.orhanobut.logger.Settings;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * Created by admin on 2016/9/23.
 */
public class Log{

    public static Settings init(){
       return Logger.init();
    }

    public static Settings init(String tag){
        return Logger.init(tag);
    }

    public void d(String message, Object... args){
        Logger.d(getDate()+message,args);
    }

    public static void d(Object object) {
        Logger.d(getDate()+object);
    }

    public static void e(String message, Object... args) {
        Logger.e(getDate()+message,args);
    }

    public static void e(Throwable throwable, String message, Object... args) {
        Logger.e(throwable,getDate()+message,args);
    }

    public static void i(String message, Object... args) {
        Logger.e(getDate()+message,args);
    }

    public static void v(String message, Object... args) {
        Logger.v(getDate()+message,args);
    }

    public static void w(String message, Object... args) {
        Logger.w(getDate()+message,args);
    }

    public static void wtf(String message, Object... args) {
        Logger.e(getDate()+message,args);
    }

    public static void json(String json) {
        Logger.json(json);
    }

    public static void xml(String xml) {
        Logger.xml(xml);
    }

    public static String getDate(){
        return new SimpleDateFormat("yy年MM月dd日 HH:mm:ss").format(new Date())+"：";
    }
}
